package org.lcc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.lcc.model.entity.CertificateIssuance;
import org.lcc.model.VO.CertificateVO;

import java.util.List;

/**
 * 证书Mapper接口
 */
@Mapper
public interface CertificateMapper extends BaseMapper<CertificateIssuance> {
    
    /**
     * 获取学生证书列表
     *
     * @param studentId 学生ID
     * @param keyword 搜索关键词
     * @return 证书列表
     */
    List<CertificateVO> selectStudentCertificates(@Param("studentId") String studentId, @Param("keyword") String keyword);



    /**
     * 根据证书编码获取证书信息
     * @param certificateCode 证书编码
     * @return 证书信息
     */
    @Select("SELECT * FROM certificate_issuance WHERE certificate_code = #{certificateCode}")
    CertificateIssuance getCertificateByCode(@Param("certificateCode") String certificateCode);
} 